package com.sc.highspeed.service;

import com.sc.highspeed.db.dao.CarInfoTempDao;
import com.sc.highspeed.db.model.CarInfoModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2017/12/7.
 */
@Service
public class CarInfoTempService {

    @Autowired
    private CarInfoTempDao carInfoTempDao;

    public CarInfoModel getCarInfoByNumber(String number, String color) {
        return carInfoTempDao.getCarInfoByNumber(number, color);
    }

    public List<CarInfoModel> getCarInfoList(int startRow, int pageSize) {
        return carInfoTempDao.getCarInfoList(startRow, pageSize);
    }

    public int insertCarInfo(CarInfoModel carInfoModel) {
        return carInfoTempDao.insertCarInfo(carInfoModel);
    }

    public int updateCarInfoById(CarInfoModel carInfoModel) {
        return carInfoTempDao .updateCarInfoById(carInfoModel);
    }

    public int deleteCarInfoById(int id) {
        return carInfoTempDao.deleteCarInfoById(id);
    }

    public CarInfoModel getCarInfoById(int id) {
        return carInfoTempDao.getCarInfoById(id);
    }

    public List<CarInfoModel> getCarInfoListByUsername(String creatorUsername) {
        return carInfoTempDao.getCarInfoListByUsername(creatorUsername);
    }

    public List<CarInfoModel> getHazyCarInfo(String number, String color) {
        return carInfoTempDao.getHazyCarInfo(number, color);
    }

    public int getCarInfoNumber() {
        return carInfoTempDao.getCarInfoNumber();
    }


}
